import request from '@/utils/request'

// 查询学生任务记录列表
export function listSubmit(query) {
  return request({
    url: '/learnmanagement/submit/list',
    method: 'get',
    params: query
  })
}

// 查询学生任务记录详细
export function getSubmit(id) {
  return request({
    url: '/learnmanagement/submit/' + id,
    method: 'get'
  })
}

// 新增学生任务记录
export function addSubmit(data) {
  return request({
    url: '/learnmanagement/submit',
    method: 'post',
    data: data
  })
}

// 修改学生任务记录
export function updateSubmit(data) {
  return request({
    url: '/learnmanagement/submit',
    method: 'put',
    data: data
  })
}

// 删除学生任务记录
export function delSubmit(id) {
  return request({
    url: '/learnmanagement/submit/' + id,
    method: 'delete'
  })
}

// 根据学生ID查询学生任务记录
export function getSubmitByStuId(stuId) {
  return request({
    url: '/learnmanagement/submit/list',
    method: 'get',
    params: { stuId }
  })
}
